//
//  LeftMenuTableViewController.m
//  KYClient
//
//  Created by mac on 16/2/29.
//  Copyright © 2016年 com.gp123. All rights reserved.
//

#import "LeftMenuTableViewController.h"
//#import "IndividualCenterCell.h"
#import "ViewController.h"
#import "BaseNavigationController.h"
#import "JHLoginViewController.h"
#import "JHRegisterViewController.h"


@interface LeftMenuTableViewController ()
@property (weak, nonatomic) IBOutlet UIView *headerView;
@property (weak, nonatomic) IBOutlet UIImageView *UserImageView;

@end

@implementation LeftMenuTableViewController

-(BOOL)prefersStatusBarHidden{
    return true;
}

//点击登陆按钮,跳转到登陆页面
- (IBAction)didClickLoginBtk:(id)sender {
    
   // ViewController *vc = [[ViewController alloc] init];
    JHLoginViewController *vc = [[JHLoginViewController alloc] init];
    //wwwViewController *vc = [[wwwViewController alloc] init];
    BaseNavigationController * nav= [[BaseNavigationController alloc]initWithRootViewController:vc];
    [self presentViewController:nav animated:YES completion:nil];
}
//点击注册按钮,跳转到注册界面
- (IBAction)didClickRegisterBtn:(id)sender {
    
    JHRegisterViewController *vc = [[JHRegisterViewController alloc] init];
    BaseNavigationController *nav = [[BaseNavigationController alloc] initWithRootViewController:vc];
    [self presentViewController:nav animated:YES completion:nil];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    self.headerView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"nav"]];
    self.navigationController.navigationBarHidden = YES;

    
}

//重写构造方法
-(instancetype)init{
    if (self= [super init]) {
        //从storyBoard加载访客视图控制器
        UIStoryboard * storyBoard= [UIStoryboard
                                    storyboardWithName:@"LeftMenu_visit" bundle:nil];
        
        self = (LeftMenuTableViewController *)[storyBoard
                                                instantiateViewControllerWithIdentifier:@"visitor"];
        
    }
    return self ;
}
//选中某个cell
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    //获取点击的cell
//    UITableViewCell * cell = [tableView  cellForRowAtIndexPath:indexPath];
    
    
}

@end
